home *** CD-ROM | disk | FTP | other *** search
/ Beginning Mac Programming / Beginning Mac Programming.bin / pc / Open Me for REALbasic 3 / REALbasic 3.2 / Goodies / Development Tools / XCMDs and XFCNs / Text / NumStringer XFCN 1.0 / cards.xml < prev    next >
Encoding:
Text File  |  1996-09-02  |  4.7 KB  |  117 lines

  1. card_2941.xml
  2. <?xml version="1.0" encoding="utf-8" ?>
  3. <!DOCTYPE card PUBLIC "-//Apple, Inc.//DTD card V 2.0//EN" "" >
  4. <card>
  5.     <id>2941</id>
  6.     <filler1>0</filler1>
  7.     <bitmap>BMAP_2158.pbm</bitmap>
  8.     <cantDelete> <false /> </cantDelete>
  9.     <showPict> <true /> </showPict>
  10.     <dontSearch> <false /> </dontSearch>
  11.     <owner>2672</owner>
  12.     <link rel="stylesheet" type="text/css" href="stylesheet_3235.css" />
  13.     <part>
  14.         <id>3</id>
  15.         <type>field</type>
  16.         <visible> <true /> </visible>
  17.         <dontWrap> <false /> </dontWrap>
  18.         <dontSearch> <false /> </dontSearch>
  19.         <sharedText> <false /> </sharedText>
  20.         <fixedLineHeight> <false /> </fixedLineHeight>
  21.         <autoTab> <false /> </autoTab>
  22.         <lockText> <true /> </lockText>
  23.         <rect>
  24.             <left>1</left>
  25.             <top>82</top>
  26.             <right>511</right>
  27.             <bottom>309</bottom>
  28.         </rect>
  29.         <style>scrolling</style>
  30.         <autoSelect> <false /> </autoSelect>
  31.         <showLines> <false /> </showLines>
  32.         <wideMargins> <true /> </wideMargins>
  33.         <multipleLines> <false /> </multipleLines>
  34.         <reservedFamily> 0 </reservedFamily>
  35.         <titleWidth>0</titleWidth>
  36.         <icon>0</icon>
  37.         <textAlign>left</textAlign>
  38.         <font>Monaco</font>
  39.         <textSize>9</textSize>
  40.         <textStyle>plain</textStyle>
  41.         <textHeight>12</textHeight>
  42.         <name></name>
  43.         <script></script>
  44.     </part>
  45.     <part>
  46.         <id>10</id>
  47.         <type>button</type>
  48.         <visible> <true /> </visible>
  49.         <reserved5> 0 </reserved5>
  50.         <reserved4> 0 </reserved4>
  51.         <reserved3> 0 </reserved3>
  52.         <reserved2> 0 </reserved2>
  53.         <reserved1> 0 </reserved1>
  54.         <enabled> <true /> </enabled>
  55.         <rect>
  56.             <left>4</left>
  57.             <top>54</top>
  58.             <right>118</right>
  59.             <bottom>76</bottom>
  60.         </rect>
  61.         <style>rectangle</style>
  62.         <showName> <true /> </showName>
  63.         <highlight> <false /> </highlight>
  64.         <autoHighlight> <true /> </autoHighlight>
  65.         <sharedHighlight> <true /> </sharedHighlight>
  66.         <family>0</family>
  67.         <titleWidth>0</titleWidth>
  68.         <icon>0</icon>
  69.         <textAlign>center</textAlign>
  70.         <font>Chicago</font>
  71.         <textSize>12</textSize>
  72.         <textStyle>plain</textStyle>
  73.         <name>NumStringer</name>
  74.         <script>on mouseUp
  75. answer numstringer(random(1000),4)
  76. end mouseUp</script>
  77.     </part>
  78.     <part>
  79.         <id>11</id>
  80.         <type>button</type>
  81.         <visible> <true /> </visible>
  82.         <reserved5> 0 </reserved5>
  83.         <reserved4> 0 </reserved4>
  84.         <reserved3> 0 </reserved3>
  85.         <reserved2> 0 </reserved2>
  86.         <reserved1> 0 </reserved1>
  87.         <enabled> <true /> </enabled>
  88.         <rect>
  89.             <left>419</left>
  90.             <top>21</top>
  91.             <right>461</right>
  92.             <bottom>61</bottom>
  93.         </rect>
  94.         <style>rectangle</style>
  95.         <showName> <false /> </showName>
  96.         <highlight> <false /> </highlight>
  97.         <autoHighlight> <false /> </autoHighlight>
  98.         <sharedHighlight> <true /> </sharedHighlight>
  99.         <family>0</family>
  100.         <titleWidth>0</titleWidth>
  101.         <icon>257</icon>
  102.         <textAlign>center</textAlign>
  103.         <font>Chicago</font>
  104.         <textSize>12</textSize>
  105.         <textStyle>plain</textStyle>
  106.         <name></name>
  107.         <script></script>
  108.     </part>
  109.     <content>
  110.         <layer>card</layer>
  111.         <id>3</id>
  112.         <text><span class="style1">umStringer is a function that takes two parameters. The first parameter is a number that will be operated on. The second parameter is the number of digits that the first number should occupy. If the first parameter has fewer digits than the second parameter, the result will be the first parameter padded with leading zeros to fill all the digits. If the first parameter has more digits than the second parameter, the result will be the first parameter. I've found this useful in applications where I needed to serialize a set of documents and could simply append a number, and still keep them in order.
  113.  
  114. </span><span class="style2">Examples</span><span class="style1">
  115.     NumStringer(999,4)           -> 0999
  116.     NumStringer(1234,4)          -> 1234
  117.     "Doc#" & NumStringer(99,3)   -> Doc#099
  118.  
  119. Click on and/or examine the script of the button above to see how it works!
  120.  
  121. This external is free for purely personal use. A license fee of $10.00 is required if you use this external in any ‚Äúin-house‚Äù corporate, shareware or freeware products. The license fee for unlimited commercial use in a SINGLE ‚Äúfor sale‚Äù product is $25.00. The license fee for unlimited commercial use with MULTIPLE products is $100.00.
  122.  
  123. Permission is hereby granted to all groups who distribute demo software, either for profit (such as EduCorp) or not for profit (such as a Macintosh Users Group), to include this file in their collection. My goal is to get as much exposure for my products as possible, and I believe that these groups offer an invaluable service to shareware publishers like myself.
  124.  
  125. If you have questions or comments we can be reached through the following:
  126.  
  127. Iverson Software Co.          507.625.7355
  128. 522 Record St.                j5rson@prairie.lakes.com
  129. Mankato MN  56001-2546        http://prairie.lakes.com/~j5rson/
  130. </span></text>
  131.     </content>
  132.     <name></name>
  133.     <script></script>
  134. </card>
  135.  
  136.  
  137.